package com.plian.system.service.pf;

import com.plian.Tools.pagedata.PageData;
import com.plian.system.dto.pf.BaseExpenditureImplementationDTO;
import com.plian.system.entity.pf.BaseExpenditureImplementation;
import com.plian.system.model.ListResult;
import com.plian.system.model.R;
import com.plian.system.mybatis.base.BaseService;
import com.plian.system.mybatis.support.Query;
import com.plian.system.vo.pf.BaseExpenditureImplementationVO;
import com.plian.system.vo.pf.ExpenditureOrgVO;
import com.plian.system.vo.report.ReportReturnVO;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.HashMap;
import java.util.List;

public interface IBaseExpenditureImplementationService extends BaseService<BaseExpenditureImplementation> {

    HashMap<String,Object> commit(String id);

    Boolean finish(String id);

    Boolean reject(String id, int formState,String comment);

    Boolean cancel(Long id);

    List<PageData> findByIds(List<String> formIds);

    void goBackToStash(String formId);

    boolean submit(BaseExpenditureImplementation expenditureImplementation);

    R<BaseExpenditureImplementationVO> getDetailObj(BaseExpenditureImplementation expenditureImplementation);

    /**
     * @Description: //TODO 获取最新数据
     * @Author: Take-off
     * @Date: 5:17 PM 2023/3/13
     * @Param: [dto]
     * @return: com.plian.system.model.R<com.plian.system.vo.pf.BaseExpenditureImplementationVO>
     **/
    R<BaseExpenditureImplementationVO> getLastDetailObj(BaseExpenditureImplementationDTO dto);

    ListResult<BaseExpenditureImplementationVO> list(@RequestBody Query query);

    /**
     * @Description: //TODO 支出执行报表
     * @Author: Take-off
     * @Date: 2:09 PM 2023/3/14
     * @Param: [dto]
     * @return: com.plian.system.vo.report.ReportReturnVO
     **/
    ReportReturnVO report(BaseExpenditureImplementationDTO dto);

    /**
     * @Description: //TODO 数据汇总
     * @Author: Take-off
     * @Date: 7:21 PM 2023/3/19
     * @Param: [year, orgId]
     * @return: java.util.List<com.plian.system.vo.pf.ExpenditureOrgVO>
     **/
    List<ExpenditureOrgVO> getDataSummary(String year, String orgId);

    /**
     * @Description: //TODO 树形列表
     * @Author: Take-off
     * @Date: 4:28 PM 2023/3/19
     * @Param: [query]
     * @return: com.plian.system.model.ListResult<com.plian.system.vo.pf.BaseExpenditureImplementationVO>
     **/
    ListResult<BaseExpenditureImplementationVO> treeList(Query query);

    /**
     * @Description: //TODO 返回本月子企业数据汇总值
     * @Author: Take-off
     * @Date: 4:44 PM 2023/3/19
     * @Param: [orgIds, executionMonth]
     * @return: com.plian.system.vo.pf.BaseExpenditureImplementationVO
     **/
    BaseExpenditureImplementationVO addSumValue(List<String> orgIds, String executionMonth);

    /**
     * @Description: //TODO 初始化
     * @Author: Take-off
     * @Date: 2:29 PM 2023/3/22
     * @Param: [expenditureImplementationVO]
     * @return: com.plian.system.vo.pf.BaseExpenditureImplementationVO
     **/
    BaseExpenditureImplementationVO initialization(BaseExpenditureImplementationVO expenditureImplementationVO);
}
